package model;

public abstract class ElementarTerm {

	String eleTermId;
	String var1;
	String var2;
	
	public ElementarTerm(String varName, String replacedPart) {
		eleTermId=varName;
		var1=getVar1(replacedPart);
		var2=getVar2(replacedPart);
	}

	private String getVar1(String term) {
		int pos = StringAnalyser.getOperatorPos(term);
		return term.substring(0,pos);
	}

	private String getVar2(String term) {
		int pos = StringAnalyser.getOperatorPos(term);
		return term.substring(pos+1);
	}

	//public abstract Value execute(VarValueList varValueList);

	public abstract void execute(VarValueList varValueList);

	public abstract void speedExecute(SpeedVarValueList speedVarValueList);
	
}
